package com.guomao;

import java.text.ParseException;

public class ThrowableDemoD {

    public static void main(String[] args) throws ParseException {


//        Date d = new Date();
//
//        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        //把日期对象 -> 字符串
//        String time = format.format(d);
//        System.out.println(time);

        //把定义的字符串日期 -> Date日期对象

//        String time = "2025-5-18 10:34:51";
//
//        Date d1 = format.parse(time);
//
//        System.out.println(d1);


//        User user = new User();
//        user.setAge(-20);

        System.out.println("Hello World");
        System.out.println("Hello World");
        System.out.println("Hello World");

        try {
            System.out.println(10 / 0);
        } catch (Exception e) {
            e.printStackTrace();
        }

        System.out.println("Hello World");
        System.out.println("Hello World");
        System.out.println("Hello World");
        System.out.println("Hello World");
    }
}
